package com.mxl.gateway.controller;

import com.alibaba.csp.sentinel.adapter.gateway.common.api.GatewayApiDefinitionManager;
import com.alibaba.csp.sentinel.adapter.gateway.common.rule.GatewayRuleManager;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class SentinelController {

    @GetMapping("/gw-flow")
    public Object GetGatewayFlowConfig(){
        return GatewayRuleManager.getRules();
    }


    @GetMapping("/gw-api-group")
    public Object GetGatewayApiGroupConfig(){
        return GatewayApiDefinitionManager.getApiDefinitions();
    }


}
